var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            if (cm.isQuestFinished(31241) && !cm.isQuestFinished(31245)) {
                cm.sendNormalTalk("……", 4, 2074000, false, true)
            } else {
                if (cm.isQuestFinished(30455)) {
                    cm.sendNormalTalk("总算能安心一会了。", 4, 2074000, false, true)
                } else {
                    cm.sendNormalTalk("如果继续放任玉石胡作非为，那童话村不知道会变成什么样。如果不阻止这件事，整个玩具城都危险了。", 4, 2074000, false, true)
                }
            }
        } else {
            cm.dispose()
        }
    }
};